Triangles With Known Sides

{Aside: This section requires a tiny amount of vector material, beyond what has been presented to this point.}
Suppose we wanted to construct a triangle that has given side lengths. If it is a right triangle, then it is quite easy since the two shorter sides can be constructed along the axes and their ends connected. However, suppose we are given side lengths of $a,b,$ and $c,$ and they do not have Pythagorean proportions. In that case, we have to use the Law of cosines to find the angle $\theta$ between two of the sides. It may be useful to examine the three given leg lengths for assurance of a triangle. All possible pairs of two legs must add together to be greater than the remaining leg.

Choose two legs to be sides $a$ and $b$. By default that also selects leg $c$. From the law of cosines, $$a^{2}+b^{2}-2\cdot ab\cdot \cos(\theta)=c^{2}.$$

If we solve this for $\theta$ using variables $a,b,c,$ we get $$\theta=\pi-\arccos\left(-\frac{a}{2b}-\frac{b}{2a}+\frac{c^{2}}{2ab}\right). \tag{1} \label{1}$$ However, just knowing the angle between legs $a$ and $b$ may not be sufficient to construct the triangle, especially if we are doing it on graph paper. What we really would like to know is the coordinates of all three vertices, $A,B,$ and $C$ needed to assure that legs $a,b$ and $c$ have the correct length. To show how this is done, let's use a numerical example.

Example: Suppose we are given leg lengths of $a=5,\;b=8,$ and $c=4$. Putting one vertex at the origin, find the remaining coordinates. Refer to figure 1.
Answer: Let vertex $A,\;B$ and $C$ be opposite legs $a,\;b$ and $c$ and put vertex $C$ at $(0,0)$. From equation $\eqref{1}$, $\theta=0.421442\;\text{ rads}$. Let's let leg $b=8$ go along the $x$-axis, so that vertex $A$ (across from leg $a$) has coordinates $(8,0)$. The angle between $a$ and $b$ is $\theta$ and it has slope $m=tan(\theta)$ (See section "Angle between two lines" for a quick refresher.). From a slope, we can construct a direction vector, $$\mathbf{u}=\left(\begin{array}{c} 1\\ m \end{array}\right)=\left(\begin{array}{c} 1\\ tan(\theta) \end{array}\right)$$ Although, we would really like to have the unit direction vector, $$\mathbf{u^{\prime}}=\frac{\left(\begin{array}{c} 1\\ tan(\theta) \end{array}\right)}{\left\Vert \left(\begin{array}{c} 1\\ tan(\theta) \end{array}\right)\right\Vert}=\left(\begin{array}{c} 0.9125\\ 0.40908 \end{array}\right)$$ Now using $$\text{New Point} = \text{Start Point} + \text{(distance)} ยท \text{(unit direction vector)},$$ point $$B=(0,0)+5\cdot\mathbf{u'}=(4.5625,\;2.0453).$$
Triangle known sides.png
Figure 1: A triangle with known side lengths can be constructed by setting one of the legs to be along the axis and then calculating the other coordinates. In this figure, a unit vector was computed from the angle, $\theta$, which had been calculated from the law of sines.